DO WHILE .T.
   NUM=ST_MAX-ST_ACT_BUY
   @ 13,  2  SAY  KODE
   @ 13,  8  SAY  NAME
   @ 13, 29  SAY  TIPE
   @ 13, 42  SAY  QANT
   @ 13, 50  SAY  ST_REFIL
   @ 13, 59  SAY  ST_ACT_BUY
   @ 13, 69  SAY  ST_MAX-ST_ACT_BUY
   @ 14,  8  SAY  BUY_UNIT
  IF BUY_SELL_R<>1
     @ 14, 21  SAY "of"
     @ 14, 24  SAY  BUY_SELL_R
     @ 14, 29  SAY  SELL_UNIT
  ENDIF
  @ 15,25 clea to 18,78
  @ 18,1 clea to 23,78
  ORD='Y'
  DO WHILE .T.
     @ 16,22 GET ORD PICT '@!'
     READ
     PRS=LASTKEY()
     IF PRS=27
        BACK='Y'
        RETURN
     ENDIF
     IF ORD='Y' .OR. ORD='N'
        EXIT
     ENDIF
     LOOP
  ENDDO
  IF ORD='N'
     RETURN
  ELSE
     @ 15, 28  TO 17, 76    DOUBLE
     @ 16, 30  SAY "IF Y(ES), ACCEPT SUGGESTED RE-ORDER (Y/N) :"
     PILIH='Y'
     DO TANYA WITH 16,74,'YN',PILIH
     @ 18,1 CLEA TO 21,78
     @ 18,  3  TO 20, 76    DOUBLE
     @ 21,  3  TO 23, 33    DOUBLE
     @ 19,  5  SAY "QUANTITY :             UNIT PRICE :                 DISCOUNT :       %"
     @ 22,  5  SAY "VALUE    :"
     IF PILIH='Y'
        NUM=ST_MAX-ST_ACT_BUY
     ELSE
        NUM=0
     ENDIF
     PRIC=0
     DISC=0
     if num=0
        do while num=0
           @ 19,16 GET NUM PICT '9,999'
           read
           loop
        enddo
     else
        @ 19 ,16 say num pict "9,999"
     endif
     do while pric=0
        @ 19,41 GET PRIC PICT '99,999,999.99'
        read
        loop
     enddo
     @ 19,67 GET DISC PICT '99.99'
     READ
     VALDISC=DISC/100*PRIC
     NETPRIC=PRIC-VALDISC
     VALU=NUM*NETPRIC
     @ 22,14 SAY VALU PICT '99,999,999.99'
     @ 21, 39 TO 23, 76    DOUBLE
     @ 22, 41  SAY "Confirm -->> Enter   Cancel -->> F4"
     STORE 0 TO MX
     DO WHILE MX=0
        MX=INKEY()
     ENDDO
      DO CASE
         CASE MX=-3
            @ 16,31 CLEA TO 18,78
            @ 19,01 CLEA TO 23,78
            LOOP
         CASE MX=13
            @ 21 ,39 clea to 23,78
            @ 21, 39 TO 23, 65    DOUBLE
            @ 22, 43 SAY "SELECTION OF SUPPLIER"
*            SET CONS OFF
*            WAIT
*            SET CONS ON
            RETURN
      ENDCASE
   ENDIF
ENDDO
